x = 300
def outer():
    x = 200
    def inner():
        nonlocal x
        # global x
        print('---1---x=%d' % x)
        x = 100
        print('---2---x=%d' % x)
    return inner

t1 = outer()
t1()